Skip to content

Conversation

nxf58150
Copy link
Contributor

@nxf58150 nxf58150 commented Jun 24, 2025

Added wlan wakeup pin in MIMXRT1060-EVK dts file. This WLAN wakeup support is for IW610 and MIMXRT1060-EVK acts as host. Add wakeup pin configuration when doing device related initialization.

Copy link

github-actions bot commented Jun 24, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@54f8ccc zephyrproject-rtos/hal_nxp@870b2a5 zephyrproject-rtos/[email protected]

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-hal_nxp DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jun 24, 2025
@butok
Copy link
Contributor

butok commented Jun 24, 2025

Please use correct board name MMXRT1060-EVK instead of EVKC1060 in the PR name & description.

@nxf58150 nxf58150 changed the title drivers: wifi: Add WLAN wakeup for EVKC1060 drivers: wifi: Add WLAN wakeup for MIMXRT1060-EVK Jun 24, 2025
@nxf58150
Copy link
Contributor Author

Please use correct board name MMXRT1060-EVK instead of EVKC1060 in the PR name & description.

Updated. Thanks!

#ifdef CONFIG_NXP_RW610
return POWER_GetWakeupStatus(WL_MCI_WAKEUP0_IRQn);
#elif CONFIG_NXP_IW610
return GPC_GetIRQStatusFlag(GPC, GPIO1_Combined_0_15_IRQn);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type of wakeup code should be in the GPIO driver and not in the driver. The driver should only have to use the GPIO_INT_WAKEUP flag in the device tree node.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For IW610, we use OOB wakeup as WLAN wakeup method. This means if firmware received WLAN packet that matches wakeup condition, firmware will toggle the specific GPIO0_1. This GPIO pin is on M2 port (IW610 will be attached here) of EVKC1060 and is used for WLAN specifically. I think it is a proper way to add it in WLAN driver.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, where are you configuring the GPIO interrupt to be wakeup capable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I consulted someone from EP team about this and he told me that all interrupts were enabled as wakeup sources by default. Checked value of GPC->IMR1 ~ GPC->IMR5 registers and confirmed. This was also confirmed during tests.
Therefore, no additional action needed for GPIO wakeup capable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at this PR: #95813
This should allow removing the platform specific #defines from this driver.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed your PR and noticed that you added new macro define NXP_GET_WAKEUP_SIGNAL_STATUS(irqn) in all NXP socs. But the IRQ number is different for different platform, I think the platform specific defines are still needed.
Maybe it could be like this:

#ifdef CONFIG_NXP_RW610
#define WAKEUP_IRQ WL_MCI_WAKEUP0_IRQn
#elif CONFIG_NXP_IW610
#define WAKEUP_IRQ GPIO1_Combined_0_15_IRQn
#else
#define WAKEUP_IRQ 0
#endif
...
static bool nxp_wifi_wlan_wakeup(void)
{
    return NXP_GET_WAKEUP_SIGNAL_STATUS(WAKEUP_IRQ);
}

Please add your comment. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can get the Wakeup IRQ from Device Tree. You could use interrupt-names to name the interrupts and use DT_IRQ_BY_NAME and DT_IRQ_HAS_NAME to get the wakeup interrupt.
For the one's that needs GPIO, this can be set at the board-level dts file.

MaochenWang1
MaochenWang1 previously approved these changes Sep 9, 2025
mmahadevan108
mmahadevan108 previously approved these changes Oct 6, 2025
@github-actions github-actions bot removed the DNM (manifest) This PR should not be merged (controlled by action-manifest) label Oct 6, 2025
@mmahadevan108
Copy link
Contributor

@jukkar , please review

Added wlan wakeup pin in IW610 overlay file. This WLAN wakeup
support is for IW610 and MIMXRT1060-EVK acts as host. Add wakeup
pin configuration when doing device related initialization.

Signed-off-by: Hui Bai <[email protected]>
@mmahadevan108
Copy link
Contributor

@jukkar , the HAL side has merged and the PR was updated to resolve conflicts in west.yml

Copy link

sonarqubecloud bot commented Oct 7, 2025

@dleach02 dleach02 self-assigned this Oct 7, 2025
@dleach02
Copy link
Member

dleach02 commented Oct 7, 2025

@jukkar I added myself as assignee since it is all NXP files ... and we are trying to sequence some HAL PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants